/**
 * @author lulongwen
 * Date: 2023-08-25 22:45
 * Description:
 */

import { memo } from 'react';
import { Handle, Position, NodeResizer } from 'reactflow';

const ResizableNode = ({ data }: { data: { label: string } }) => {

  return (
    <>
      <NodeResizer
        minWidth={100}
        minHeight={30}
      />

      <Handle type='target' position={Position.Left} />

      <div style={{ padding: 10 }}>
        {data.label}
      </div>

      <Handle type='source' position={Position.Right} />
    </>
  );
};

export default memo(ResizableNode);
